<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">
	<meta http-equiv="X-UA-Compatible" content="IE=edge">
	<title>菜单管理</title>
	<!-- Tell the browser to be responsive to screen width -->
	<meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
	<!-- Bootstrap 3.3.6 -->
	<link rel="stylesheet" href="${siteurl}bootstrap/css/bootstrap.min.css">
	<!-- Font Awesome -->
	<link rel="stylesheet" href="${siteurl}plugins/FontAwesome/css/font-awesome.min.css">
	<!-- Ionicons -->
	<link rel="stylesheet" href="${siteurl}plugins/ionicons201/css/ionicons.min.css">
	<!-- Theme style -->
	<link rel="stylesheet" href="${siteurl}dist/css/AdminLTE.min.css">
	<!-- AdminLTE Skins. Choose a skin from the css/skins
         folder instead of downloading all of them to reduce the load. -->
	<link rel="stylesheet" href="${siteurl}dist/css/skins/_all-skins.min.css">

	<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
	<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
	<!--[if lt IE 9]>
	<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
	<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
	<![endif]-->
	[#include "/admin/common/commons.html"]

</head>
<body class="hold-transition skin-blue sidebar-mini">
<!-- Site wrapper -->
<div class="wrapper">

	<header class="main-header">
		<!-- Header Navbar: style can be found in header.less -->
		[#include "/admin/common/nav.html"]
	</header>

	<!-- =============================================== -->

	<!-- Left side column. contains the sidebar -->
	<aside class="main-sidebar">
		<!-- sidebar: style can be found in sidebar.less -->
		<section class="sidebar">
			<!-- Sidebar user panel -->
			[@user_panel /]
			<!-- search form -->
			[@sidebar_form /]
			<!-- /.search form -->
			<!-- sidebar menu: : style can be found in sidebar.less -->
			<ul class="sidebar-menu">
				<li class="header">主面板</li>
				[@menustag id=1]
					[#list list as item]
						[@menu item "1,2,3"]
						[/@menu]
					[/#list]
				[/@menustag]
			</ul>
		</section>
		<!-- /.sidebar -->
	</aside>

	<!-- =============================================== -->

	<!-- Content Wrapper. Contains page content -->
	<div class="content-wrapper">
		<!-- Content Header (Page header) -->
		<section class="content-header">
			<h1>
				菜单管理
				<small>管理系统的菜单</small>
			</h1>
			<ol class="breadcrumb">
				<li><a href="#"><i class="fa fa-dashboard"></i> 首页</a></li>
				<li >菜单管理</li>
				[#if tops??]
				[#list tops as item]
				[#if item.id==pid]
				<li>
					${item.name}
				</li>
				[#else]
				<li>
					<a  href="${siteurl}admin/menu/view_list.htm?id=${item.id}">${item.name}</a>
					[/#if]
				</li>
				[/#list]
				[/#if]
			</ol>
		</section>


		<!-- Main content -->
		<section class="content">

			<!-- Default box -->
			<div class="row">

				<div class="col-xs-12">

					<div class="box  box-solid">

						<form class="form-inline" role="form"
							  action="${siteurl}admin/menu/model_save.htm" method="post">
							<input type="hidden" name="parent.id" value="${pid}">
							<div class="box-body">
								<div class="widget-main">
									<div class="row">
										<div class="col-xs-12 col-sm-12 ">
											<div class="form-group">
												<label for="control-label no-padding-right">分类</label>
												<input required="required" type="text" name="name" placeholder="分类 "
													   class="form-control search-query">

											</div>

											<div class ="form-group" >

												<label for="control-label no-padding-right">url</label>
												<input  class="form-control"
														type="text" placeholder="url" name="path" id="path">
											</div>
											<div class ="form-group" >

												<label for="control-label no-padding-right">排序号</label>
												<input class="form-control" style="width: 100px;"
													   type="number" placeholder="排序号" name="sortNum" id="path">
											</div>
											<div class="form-group">
												<label for="control-label no-padding-right">权限</label>
												<input class="form-control" maxlength="30" placeholder="权限" name="permission" id="permission" type="text">
											</div>
											<select name="catalog" class="form-control">
												<option value="0">菜单</option>
												<option value="1">功能</option>
											</select>
											<div class ="form-group">

												<label for="control-label no-padding-right"
													   for="form-field-11 control-label no-padding-right"
												>图标</label>
												<select class="form-control" name="icon">
													<option value="fa fa-circle-o">默认</option>
													<option value="menu-icon fa fa-angle-right">&gt;</option>
													<option value="menu-icon fa fa-music">music</option>
													<option value="menu-icon fa fa-desktop">desktop</option>
													<option value="menu-icon fa fa-list">list</option>
													<option value="menu-icon fa fa-picture-o">picture</option>
													<option value="menu-icon fa fa-list-alt">fa-list-alt</option>
													<option value="menu-icon fa fa-calendar">fa-calendar</option>
													<option value="menu-icon fa fa fa-tag">fa fa-tag</option>
													<option value="menu-icon fa fa fa-tachometer">fa-tachometer</option>
													<option value="menu-icon fa fa fa-home">fa-home</option>
												</select>

														<span>
															<button class="btn btn-purple btn-sm" type="submit">
																添加 <i
																	class="ace-icon fa fa-plus icon-on-right bigger-110"></i>
															</button> </span>
											</div>
										</div>
									</div>
								</div>
							</div>
						</form>
					</div>
				</div>
				<div class="col-xs-12">
					<div class="box box-solid">
						<div class="box-body table-responsive no-padding">
							<table class="table table-bordered table-hover dataTable">
								<tbody>
								<tr role="row">
									<td class="col-xs-2">菜单标题</td>
									<td class="col-xs-1 text-center">图标</td>
									<td class="col-xs-1 text-center">类型</td>
									<td class="col-xs-2 text-center">权限</td>
									<td class="col-xs-2 text-center">url</td>
									<td class="col-xs-1 text-center">菜单号</td>
									<td class="col-xs-1 text-center">排序号</td>
									<td class="col-xs-3 text-center">操作</td>
								</tr>
								[#list list as item]
								<tr id="trr${item.id}">
									<td>${item.name!""}</td>
									<td class="text-center"><i class="${item.icon!''}"></i></td>
									<td class="text-center">[#if item.catalog?? && item.catalog==0]菜单[#else]功能[/#if]</td>
									<td class=" text-center">${item.permission!""}</td>
									<td class="">${item.path!""}</td>
									<td class="text-center">${item.ids!""}</td>
									<td class="text-center">${item.sortNum!""}</td>
									<td class="text-center">
										<div style="display: inline-block;">
											[#if item.levelInfo lt 5]
											[#if item.catalog==0]
											<a  class="menubutton btn btn-xs btn-info" href="${siteurl}admin/menu/view_list..htm?pid=${item.id}">
												<i class="icon-edit bigger-120">查看子菜单</i>
											</a>
											[/#if]
											[/#if]
											<a  class="menubutton btn btn-xs btn-danger"
												href="${siteurl}admin/menu/view_edit.htm?id=${item.id}">
												<i class="icon-trash bigger-120">更新</i>
											</a>
											<a  class="menubutton btn btn-xs btn-danger"  onclick="return confirm('删除后无法恢复,确定要删除吗')"
												href="${siteurl}admin/menu/model_delete.htm?typeid=${item.id}">
												<i class="icon-trash bigger-120">删除</i>
											</a>
										</div></td>
								</tr>
								[/#list]
								</tbody>
							</table>
						</div>
					</div>
				</div>
			</div>
			<!-- /.box -->

		</section>
		<!-- /.content -->
	</div>
	<!-- /.content-wrapper -->

	[#include "/admin/common/footer.html"]

	<!-- Control Sidebar -->
	[#include "/admin/common/aside.html"]

	<!-- /.control-sidebar -->
	<!-- Add the sidebar's background. This div must be placed
         immediately after the control sidebar -->
	<div class="control-sidebar-bg"></div>
</div>
<!-- ./wrapper -->

<!-- jQuery 2.2.3 -->
<script src="${siteurl}plugins/jQuery/jquery-2.2.3.min.js"></script>
<!-- Bootstrap 3.3.6 -->
<script src="${siteurl}bootstrap/js/bootstrap.min.js"></script>
<!-- SlimScroll -->
<script src="${siteurl}plugins/slimScroll/jquery.slimscroll.min.js"></script>
<!-- FastClick -->
<script src="${siteurl}plugins/fastclick/fastclick.js"></script>
<!-- AdminLTE App -->
<script src="${siteurl}dist/js/app.min.js"></script>
<!-- AdminLTE for demo purposes -->
<script src="${siteurl}dist/js/demo.js"></script>
</body>
</html>
